﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace VentaPorCatalogos.Pages
{
    public partial class VerImagen : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Request["IdArticulo"] == null)
                    imgImagen.ImageUrl = "~/Imagen.ashx?Origen=Articulo";
                else
                {
                    int wIdArticulo = int.Parse(Request["IdArticulo"]);
                    imgImagen.ImageUrl = string.Format("~/Imagen.ashx?IdArticulo={0}", wIdArticulo.ToString());
                }
            }
        }

        protected void btnCerrar_Click(object sender, EventArgs e)
        {
            ClientScript.RegisterStartupScript(typeof(Page), "closePage", "CerrarPagina();", true);
        }
    }
}